﻿using mozhi.smarterp.AuthorCenter.Enums;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;

namespace mozhi.smarterp.AuthorCenter.Permissions.Repositories
{
    public interface IPermissionGroupRepository : IRepository<PermissionGroup , Guid>
    {
        Task<List<PermissionGroup>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null,
            bool includeDetails = false, List<PermissionType> types = null, CancellationToken cancellationToken = default(CancellationToken));

        Task<long> GetCountAsync(string filter = null, List<PermissionType> types = null, CancellationToken cancellationToken = default(CancellationToken));

        Task<PermissionItem> GetItemAsync(Guid id);

        Task<PermissionItem> GetItemAsync(string code);

        Task<List<PermissionItem>> GetItemListAsync(List<string> codes);
    }
}
